import java.util.Scanner;

public class Demo02 {
    public static void main1(String[] args) {
//      自动装箱
        int a = 2;
        Integer li = a;
        System.out.println(li);

//        Integer lii = 3;
//        int b = lii;
//        System.out.println(b);

//        Integer lii = new Integer(3);
////      自动拆箱
//        int b = lii;
////      手动拆箱
//        int c = lii.intValue();
//        System.out.println(b);
    }

    public static void main2(String[] args) {
        int count  = 3;
        Scanner scanner = new Scanner(System.in);
        while(count!=0){
            System.out.println("请输入你的密码：");
            String result = scanner.nextLine();
            if (result != "1234"){
                count--;
                System.out.println("登录错误，您还有"+count+"次机会");
            }else {
                System.out.println("登录成功");
                return;
            }
        }
        return;
    }

    public static void swap(int x, int y){
        int tmp = x;
        x = y;
        y = tmp;
    }

    public static void main3(String[] args) {
        int a = 2;
        int b = 4;
        swap(a,b);
        System.out.println("a="+a+",b="+b);
    }
}
